The present invention relates to a parallel data base record distribution method and a parallel data base management system, or more particular to a record distribution method and a management system capable of managing the addition of a database unit in a parallel data base management system including a plurality of database units in versatile way.
Conventionally, when a large amount of records are to be distributed equally among a plurality of database units of a parallel database management system, a hash function is used in view of a high level of versatility against the increase in the number of records with a small overhead for distribution. In such a case, the hash function is used for both the preparation and addition of a record and the search of the record. In other words, when a new record, which has been prepared is stored in a parallel database, the hash function is used to determine a data base unit to stores it in, and when searching for the desired record, the same hash function is used to determine the data base unit having the record stored therein.
The hash function is used in the systems described in JP-A-2-113349, JP-A-4-160475 and JP-A-6-103127, for example.
As described above, the use of the hash function for both the preparation/addition of a record and the record search poses the following problems:
(1) The hash function and the result of the hashing (calculation using the hash function) depend on the actual number of divisions (the number of database units) for the parallel data base management system. Therefore, when a data base unit is added in the parallel data base management system, i.e., when the number of divisions is changed, it is necessary to redistribute the entire record stored so far among the data base units using the new hash function depending on the changed number of divisions. This imposes a great burden and makes an efficient operation of the parallel data base impossible.
(2) Even when a data base unit is added without redistributing (restoring) the record, the record is not stored in the newly-added data base unit, and it is impossible to distribute the record equally among the data base units.
The present invention has been developed to solve the above-mentioned problem points, and the object of the present invention is to provide a record distribution method and a management system capable of meeting a change in the number of data base divisions in a versatile manner in a parallel data base management system for managing a data base divided among a plurality of data base units.
The above-mentioned object of the invention is achieved by changing the hash function used for storing a record when a data base unit is added in a parallel data base management system for managing a data base divided among a plurality of data base units.
Also, the above-mentioned object of the invention is achieved by a parallel data base management system for managing a data base divided among a plurality of data base units, in which the hash function is used for storing a record and the record is searched/updated without using the hash function.
Further, the above-mentioned object of the present invention is achieved by a parallel data base management system for managing a data base divided among a plurality of data base units, in which a record is stored in an added data base unit in a greater proportion than in other data base data units for a predetermined length of time.
The above-mentioned object may be achieved by a parallel data base management system comprising the function of registering the configuration of an external memory unit for storing a data base in divided portions and referencing and altering the contents of the registered configuration, the function of uniquely determining an external memory unit for storing a record from among the external memory units registered in the data base configuration information register using the hash function as a record value, the function of storing and adding a record in an arbitrary external memory unit constituting the data base, and the function of searching for and updating a record in an arbitrary external memory unit constituting the data base. At the time of preparing and adding a record, the storage position determining function and the record storage and addition function are used to store and add the record, so that all the external memory units constituting the data base are searched concurrently using the record search and update function without using the storage position determining function at the time of record search and update, and at the time of changing the number of divisions of the data base as when a CPU is added, the data are stored mainly in an arbitrary added external memory unit.
Also, the above-mentioned object is achieved by a parallel data base management system having the function of storing the average record increase per unit time in the data base and storing the number of records in the external memory units, and the function of storing the records in an added external memory unit by altering the hash function only during the time proportional to the number of records in the external memory units divided by the average amount of increase in the records when altering the number of data base divisions, and the function of securing, during the subsequent record addition, equal storage of the records that have been found unequal at the time of altering the number of data base divisions.
Further, the above-mentioned object of the invention can be achieved by a parallel data base management system having the function of storing the number of records stored in each of the external memory units and the function of moving records to a newly added external memory unit in a CPU from each of the existing external memory units by the number of records in the existing external memory units before altering the number of data base divisions, divided by an altered number of data base divisions, in order to assure storage of equal records among the external memory units of the system.